<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<div class="widget-box">
	<div class="widget-header header-color-pink">
		<h5><i class="icon-table"></i>用户日志列表</h5>
		<div class="widget-toolbar no-border">
			<button id="refresh" class="btn btn-xs bigger btn-yellow dropdown-toggle" onclick="trans2('/system/userlog','系统管理-用户日志');">
				<i class="icon-refresh"> 刷新</i>
			</button>
		</div>
	</div>
	<div class="widget-body">
	<div class="widget-toolbox padding-2 clearfix">
		<form id="searchForm" class="form-inline" role="form">
			<div class="form-group">
				<input type="text" class="form-control" id="username" name="username" value="${username}" placeholder="登录名">
			</div>
			<div class="form-group">
				<div class="col-sm-9" style="width: 100px;padding: 0px;">
					<select name="uid" id="uid" class="col-xs-10 col-sm-5" style="width: 100px;height: 34px;">
						<option value="0" <c:if test="${uid eq 0}">selected="selected"</c:if>>-姓名-</option>
						<c:forEach items="${users}" var="user" varStatus="pageStatus">
							<option value="${user.id}" <c:if test="${user.id eq uid}">selected="selected"</c:if>>${user.name}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<button type="button" onclick="toPage(1)" class="btn btn-default  btn-sm">查询 <i class="icon-search icon-on-right bigger-110"></i></button>
		</form>
	</div>
		<div class="widget-main no-padding">
			<table class="table table-striped table-bordered table-hover">
				<thead class="thin-border-bottom">
					<tr>
						<th class='center'><i class="icon-user"></i> 登录名</th>
						<th class='center'>姓名</th>
						<th class='center'>时间</th>
						<th class='center'>内容</th>
						<th class='center'>类型</th>
						<!-- <th class='center'>操作</th> -->
					</tr>
				</thead>

				<tbody>
					<c:forEach items="${pr.list}" var="userlog" varStatus="pageStatus">
						<tr>
							<td class='center'>${userlog.username}</td>
							<td class='center'>${userlog.name}</td>
							<td class='center'><fmt:formatDate value="${userlog.createtime}" pattern="yyyy/MM/dd HH:mm" /></td>
							<td class='center'>${userlog.content}</td>
							<td class='center'>${userlog.type}</td>
							<%-- <td class='center'>
								<button onclick="edit(${user.id})" class="btn btn-xs btn-info tooltip-info" data-toggle="tooltip" data-placement="top" data-original-title="编辑">
									<i class="icon-edit bigger-110"></i>
									编辑
								</button>
							</td> --%>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	</div>
<!-- 分页开始 -->
<input type="hidden" id="pageurl" value="${root}/system/userlog"/>
<input type="hidden" id="pageform" value="searchForm"/>
<jsp:include page="../page.jsp"></jsp:include>
<!-- 分页结束 -->
<script type="text/javascript">
   $('.date-picker').datepicker({autoclose:true}).next().on(ace.click_event, function(){
		$(this).prev().focus();
	});
	$(".tooltip-info").tooltip();
</script>